#ifndef __UART_H__
#define __UART_H__
#include "main.h"

#include <stdio.h>
#include <stdarg.h>
#include <string.h>

#define TXBUFFERSIZE  50     //输出字符串的最大值
#define RXBUFFERSIZE  200     //接收字符串的最大值
#define TIMEOUT       10     //超时时间

#ifdef NDEBUG
#define UartSendString
#else
#define UartSendString Uart_FormatSend_unblock
#endif

void Uart_FormatSend_block(UART_HandleTypeDef *huart,const char *format,...);
void Uart_FormatSend_unblock(UART_HandleTypeDef *huart,const char *format,...);
void Uart_ReceiveToBuffer_block(UART_HandleTypeDef *huart,uint16_t *RxLen_finally);
void Uart_ReceiveToBuffer_unblock(UART_HandleTypeDef *huart);

#endif /*__UART_H__ */